home *** CD-ROM | disk | FTP | other *** search
- class prop.plug extends MovieClip
- {
- var runSta;
- var aniType;
- var onEnterFrame;
- function plug()
- {
- super();
- this.runSta = "rest";
- this.aniType = "none";
- this.setOEF(true);
- }
- function setOEF(p)
- {
- if(p)
- {
- this.onEnterFrame = this.OEF;
- }
- else
- {
- this.onEnterFrame = null;
- }
- }
- function setAni(p)
- {
- switch(this.aniType)
- {
- case "none":
- this._visible = true;
- this.runSta = p[0];
- this.aniType = p[1];
- break;
- case "charge":
- this.runSta = p[0];
- this.aniType = p[1];
- this._parent.cloud.setChargeOver();
- }
- }
- function OEF()
- {
- var _loc0_ = null;
- if((_loc0_ = this.runSta) === "play")
- {
- this.playAni();
- }
- }
- function playAni()
- {
- _global.ctn.sndCtrl.playSound("snd_plugInOff");
- switch(this.aniType)
- {
- case "extend":
- if(this._currentframe < 73)
- {
- this.nextFrame();
- }
- else
- {
- this._parent.cloud.ctt.gotoAndStop("charging");
- this.runSta = "charge";
- this.aniType = "none";
- }
- break;
- case "shorten":
- if(this._currentframe > 1)
- {
- this.prevFrame();
- }
- else
- {
- this._parent.cloud.setChargeOver();
- this.runSta = "rest";
- this.aniType = "none";
- this._visible = false;
- }
- }
- }
- }
-